package com.springapp.mvc.test.action;

import com.springapp.mvc.test.bean.Admin;
import com.springapp.mvc.test.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/")
public class AdminAction {
    @Autowired
    AdminService adminService;

    @RequestMapping(value = "addAdmin.do")
    public String addAdmin() {
        adminService.addAdmin("sdada","0000");
        return "hello";
    }
}
